#include "ls.h"

struct dirent * ls(char *pathname){
    DIR *dirp = opendir(pathname);
    struct dirent *pdirent = (struct dirent *)calloc(1,sizeof(struct dirent));
    if((pdirent = readdir(dirp)) != NULL){
        return pdirent;
    }
    return NULL;
}
